@font-face {
        font-family: Molot;
        src: url(fonts/Molot.ttf);
}

@font-face {
        font-family: Titillium;
        src: url(fonts/TitilliumWeb-Regular.ttf);
}

@font-face {
        font-family: MinionPro;
        src: url(fonts/MinionPro-CnIt.otf);
}

@font-face {
        font-family: GillSansMTPro;
        src: url(fonts/GillSansMTPro-BoldCondensed.ttf);
}

@font-face {
        font-family: GillSansMTProExtraBold;
        src: url(fonts/GillSansMTPro-ExtraBold.ttf);
}

html {
    position: fixed;
    height: 100%;
    overflow: hidden;
}

body {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    font: 12pt Titillium;
    color: lightgrey;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: rgb(20,20,20);
}

html, body {
    margin: 0;
    padding: 0;
}

.gradient {
    background: rgba(226,226,226,1);
    background: -moz-linear-gradient(left, rgba(226,226,226,1) 0%, rgba(219,219,219,1) 28%, rgba(209,209,209,1) 81%, rgba(254,254,254,1) 100%);
    background: -webkit-gradient(left top, right top, color-stop(0%, rgba(226,226,226,1)), color-stop(28%, rgba(219,219,219,1)), color-stop(81%, rgba(209,209,209,1)), color-stop(100%, rgba(254,254,254,1)));
    background: -webkit-linear-gradient(left, rgba(226,226,226,1) 0%, rgba(219,219,219,1) 28%, rgba(209,209,209,1) 81%, rgba(254,254,254,1) 100%);
    background: -o-linear-gradient(left, rgba(226,226,226,1) 0%, rgba(219,219,219,1) 28%, rgba(209,209,209,1) 81%, rgba(254,254,254,1) 100%);
    background: -ms-linear-gradient(left, rgba(226,226,226,1) 0%, rgba(219,219,219,1) 28%, rgba(209,209,209,1) 81%, rgba(254,254,254,1) 100%);
    background: linear-gradient(to right, #45454505 0%, #2b2b2bb8 38%, #2b2b2be0 55%, #000000 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#fefefe', GradientType=1 );     
}

.imgSliders {
    margin-top:5px;
    margin-bottom:5px;
    width: 300px;
}

#btnWireframe button {
    border: 2px solid #707070;
    font: 12pt GillSansMTPro;
    height: 45px;
    background-color: lightgray;
}

#canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: rgba(0,0,0,0);
    background-image: url(assets/placeholder.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto;
    left: 0;
    top: 0;
    touch-action: none;
}

#loading {
    position: fixed;
    width: 100px;
    height: 100px;
    background-image: url(assets/loading.gif);    
    z-index: 2;
}

#faces {
    position: absolute;
    margin: auto;
    margin-left: 70%;
    right: 20px;
    bottom: 0;
    height: 100%;
    display: table;
}

#faces ul {
    top: 50%;
    list-style: none;
    bottom: 0;
    width: 100%;
    padding: 0;
    display: table-cell;
    vertical-align: middle;
}

#faces ul li {
    width: 45%;
    padding: 10px;
    float: left;
}

#faces ul li img {
    width: 100%;
}

#faces ul li img:hover {
    cursor: pointer;
} 

#HUDleft {
    position: absolute;    
    top: 50%;
    margin-left: 100px;
    transform: translateY(-50%);
}

#HUDleft h3 {
    padding-top: 30px;
}

h3 {
    font: 14pt Titillium;
    padding: 0;
    margin: 0;
    color: lightgray;
}

#loading {
    position: absolute;    
    width: 130px;
    height: 130px;
    margin: 0 auto;
    left: 0;
    right: 0;
    top: 40%;
    transform: translateY(-50%);
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url(assets/loading.gif);
    z-index: 3;
}

#placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url(assets/placeholder.png);
    z-index: 2;
}

#POlogo {
    position: absolute;
    width: 500px;
    height: 20%;
    top: 30px;
    left: 0px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top;
    background-image: url(assets/po_logo.png);
    z-index: 2;
}

#POlogo:hover {
    cursor: pointer;
}

#powered {
    width: 300px;
    height: 100px;
    position: absolute;
    left: 20px;
    bottom: 20px;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url(assets/logo-babylonjs-v3.svg);
}

@media only screen
and (max-width: 1335px) {
    #faces {
        width: 2%;
    }        
    #faces ul li {
        height: 25%;
        margin: 0;
    }
    #faces ul li img {
        position: absolute;
        max-height: 200px;
        height: 24%;
        width: auto;
        margin: 0;
        padding: 0;
        right: 8px;
    }
    #POlogo {
        width: 25%;
        height: 25%;
        background-size: contain;
        top: 12px;
        left: 10px;
        background-position-y: top;
    }
}
    
@media only screen 
and (max-width: 420px) {
    #powered {
        bottom: 10px;
        height: 70px;
        background-position: left 15px;
        background-size: contain;
        position: absolute;
        text-align: left;
        left: 50%;
        width: 40%;
    }
    #faces {
        display: none;
    }
    #btnWireframe {
        position: relative;
        top: 15px;
        left: 15px;
    }
    #btnWireframe button {
        bottom: 10px;
    }
}
    
@media only screen
and (max-width: 420px) and (max-height: 740px) {
    #HUDleft {
        top: inherit;
        margin-left: 0;
        transform: none;
        bottom: 30px;
        width: 100%;
    }
    
    #HUDleft h3 {
        text-align: center;
        margin-right: 220px;
        padding-bottom: 10px;
        padding-top: 10px;
    }
    
    .ui-slider-handle {
        width: 2.2em !important;
        height: 2.2em !important;
        top: -.7em !important;
    }
    
    #canvas {
        bottom: 240px;
        height: calc(100% - 240px);                
    }
    
    .imgSliders {
        margin: 0 auto;
    }
}

@media only screen
and (max-width: 740px) and (max-height: 420px) and (orientation: landscape) {
    #HUDleft {
        top: inherit;
        margin-left: 0;
        transform: none;
        bottom: 30px;
        width: 20%;
    }
    
    #HUDleft h3 {
        margin-left: 10px;
        padding-bottom: 10px;
        padding-top: 10px;
        font-size: 10pt;
    }
    
    .ui-slider-handle {
        width: 2.2em !important;
        height: 2.2em !important;
        top: -.7em !important;
    }
    
    #powered {
        bottom: 10px;
        height: 70px;
        background-position: left 15px;
        background-size: contain;
        position: absolute;
        text-align: left;
        left: 180px;
        width: 20%;
    }
    
    .imgSliders {
        left: 20px;
        margin: 0;
    }

    #canvas {
        left: 220px;
        width: calc(100% - 220px);        
    }
    
    #faces ul li {
        padding-top: 1px;
    }
    
    #btnWireframe button {
        position:relative;
        left: 5px;
        top: 10px;
    }
}

@media only screen 
and (max-width: 375px) {
    #btnWireframe button {
        padding: 2px;
    }
}

@media only screen
and (max-width: 340px) and (max-height: 568px) {
    #canvas {
        bottom: 220px;
        height: calc(100% - 220px);        
    }        
}

@media only screen
and (max-width: 320px) and (max-height: 480px) {
    #canvas {
        bottom: 180px;
        height: calc(100% - 180px);        
    }    
    .imgSliders {
        width: 250px;
    }
    
    #HUDleft {
        bottom: 10px;
    }
    
    #HUDleft h3 {
        padding-bottom: 0;
        padding-top: 1px;
    }
    
    #btnWireframe {
        top: 0;
    }
    
    #powered {
        bottom: -8px;
    }

    .ui-slider-handle {
        width: 1.5em !important;
        height: 1.5em !important;
        top: -.4em !important;
    }
}

@media only screen
and (max-height: 320px) and (orientation: landscape) {
    #POlogo {
        width: 15%;
        height: 15%;
    }    
}

/*tablet*/
@media only screen
and (max-width: 1025px) and (max-height: 1370px) and (min-height: 740px) and (orientation: portrait) {
    #HUDleft {
        top: inherit;
        bottom: 10px;
        transform: translateY(0);
    }
    .ui-slider-handle {
        width: 2.2em !important;
        height: 2.2em !important;
        top: -.7em !important;
    }    

    #canvas {
        bottom: 260px;
        height: calc(100% - 260px);    
        width: 80%;
    }        
    #powered {
        background-position: left 15px;
        background-size: contain;
        width: 15%;
        height: 6%;
        right: 200px;
        left: inherit;
        bottom: 0;
    }    
}

@media only screen
and (max-height: 768px) and (min-height: 420px) and (max-width: 1024px) and (orientation: landscape) {
    #HUDleft {
        margin-left: 30px;
    }
    .ui-slider-handle {
        width: 2.2em !important;
        height: 2.2em !important;
        top: -.7em !important;
    }    
    #canvas {
        left: 150px;
        width: calc(100% - 150px);    
    }
}

@media only screen
and (max-height: 480px) and (max-width: 960px) and (orientation: landscape) {
    #HUDleft {
        bottom: 10px;
    }
    #POlogo {
        width: 15%;
        height: 15%;
        background-size: contain;
    } 
    #powered {
        bottom: 10px;
        height: 50px;
        background-position: left 15px;
        background-size: contain;
        position: absolute;
        text-align: left;
        left: 180px;
        width: 20%;
   }
}

/* iphone-X */
@media only screen
and (max-width: 375px) and (min-width: 361px) and (max-height: 812px) and (orientation: portrait) {
    #HUDleft {
        margin-left: 30px;
    }
    #btnWireframe {
        top: inherit;
    }
    #canvas {
        width: 100%;
    }
    #powered {
        right: 20px;
        height: 60px;
        width: 140px;
    }
}

@media only screen
and (max-width: 812px) and (min-width: 670px) and (max-height: 375px) and (orientation: landscape) {
    #canvas {
        left: 150px;
        width: calc(100% - 150px);    
    }
    #HUDleft {
        margin-left: 30px;
        top: 210px;
        bottom: inherit;
    }
}
